import { createRouter, createWebHistory } from 'vue-router';
import UserLogin from '@/pages/UserLogin'
import SystemHome from '@/pages/SystemHome'
import UserManage from '@/pages/UserManage'
import DivisionManage from "@/pages/DivisionManage";
import MedicalManage from "@/pages/MedicalManage";
// 定义路由数组
const routes = [
    {
        path: '/',
        name: 'UserLogin',
        component: UserLogin,
    },
    {
        path: '/SystemHome',
        name: 'SystemHome',
        component: SystemHome,
        children:[
            {
                path:'UserManage',
                name:'UserManager',
                component: UserManage
            },
            {
                path:'DivisionManage',
                name:'DivisionManage',
                component: DivisionManage
            },
            {
                path:'MedicalManage',
                name:'MedicalManage',
                component: MedicalManage
            }
        ]
    }

];
// 创建路由器实例
const router = createRouter({
    history: createWebHistory(), // 使用 HTML5 历史模式
    routes, // 短数组语法
});
export default router;
